package com.xindong.paking.utils;

import java.util.Collection;
import java.util.Map;

public class StringUtil {

    public StringUtil(){}

    public static boolean isEmpty(Object... objs){
        if (objs != null && objs.length != 0){
            Object[] var1 = objs;
            int var2 = objs.length;

            for (int var3 = 0;var3 < var2; ++var3){
                Object obj = var1[var3];
                if (obj == null || "null".equals(obj)){
                    return true;
                }

                if ("".equals(obj.toString().trim())){
                    return true;
                }

                if (obj instanceof Collection){
                    Collection collection = (Collection)obj;
                    if (collection.isEmpty()){
                        return true;
                    }
                }else if (obj instanceof Map){
                    Map map = (Map) obj;
                    if (map.isEmpty()){
                        return true;
                    }
                }
            }
            return false;
        }
        else {
            return true;
        }
    }


    public static boolean isNotEmpty(Object... objs){
        return !isEmpty(objs);
    }



}
